Bookmark
singleton-considered-stupid - steveyegge2
https://sites.google.com/site/steveyegge2/singleton-considered-stupid, posted 2011 by peter in development modeling opinion
Here's what most people got out of Design Patterns: "blah blah blah blah SINGLETON blah blah blah blah". I kid you not. I've seen this so many times that it's become a full-fledged pattern in its own right; patterns need a name, so let's call it the Simpleton Pattern.
...
I'll close by saying that if you still feel the need to use Singleton objects, consider using the Factory Method pattern instead. It gives you all of the flexibility of the Singleton, with nowhere near as many problems. Using the Singleton is usually just a sign of premature optimization - I know you dread instantiating objects; you've heard it's way slow. But just relax, take a deep breath, and treat yourself to a few extra instances. You'll be amazed at how fast computers have gotten these days, and you'll be pleased at the extra flexibility using real objects gives you. Enjoy!